package com.ruoyi.homeowners.service.impl;

import com.ruoyi.homeowners.domain.Homeowners;
import com.ruoyi.homeowners.mapper.HomeownersMapper;
import com.ruoyi.homeowners.service.IHomeownersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 户主管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-11
 */
@Service
public class HomeownersServiceImpl implements IHomeownersService 
{
    @Autowired
    private HomeownersMapper homeownersMapper;

    /**
     * 查询户主管理
     * 
     * @param homeownerId 户主管理主键
     * @return 户主管理
     */
    @Override
    public Homeowners selectHomeownersByHomeownerId(Long homeownerId)
    {
        return homeownersMapper.selectHomeownersByHomeownerId(homeownerId);
    }

    /**
     * 查询户主管理列表
     * 
     * @param homeowners 户主管理
     * @return 户主管理
     */
    @Override
    public List<Homeowners> selectHomeownersList(Homeowners homeowners)
    {
        return homeownersMapper.selectHomeownersList(homeowners);
    }

    /**
     * 新增户主管理
     * 
     * @param homeowners 户主管理
     * @return 结果
     */
    @Override
    public int insertHomeowners(Homeowners homeowners)
    {
        return homeownersMapper.insertHomeowners(homeowners);
    }

    /**
     * 修改户主管理
     * 
     * @param homeowners 户主管理
     * @return 结果
     */
    @Override
    public int updateHomeowners(Homeowners homeowners)
    {
        return homeownersMapper.updateHomeowners(homeowners);
    }

    /**
     * 批量删除户主管理
     * 
     * @param homeownerIds 需要删除的户主管理主键
     * @return 结果
     */
    @Override
    public int deleteHomeownersByHomeownerIds(Long[] homeownerIds)
    {
        return homeownersMapper.deleteHomeownersByHomeownerIds(homeownerIds);
    }

    /**
     * 删除户主管理信息
     * 
     * @param homeownerId 户主管理主键
     * @return 结果
     */
    @Override
    public int deleteHomeownersByHomeownerId(Long homeownerId)
    {
        return homeownersMapper.deleteHomeownersByHomeownerId(homeownerId);
    }
}
